#ifndef PST_Curve2DKeySelcetBar_h
#define PST_Curve2DKeySelcetBar_h

#include <ElaScrollArea.h>
#include <QHBoxLayout>
#include <ElaText.h>
#include <ElaLineEdit.h>
#include <ElaPushButton.h>
#include "DataChosenListDialog.h"


namespace pst
{
    class Curve2DKeySelcetBar :public ElaScrollArea
    {
        Q_OBJECT
    public:
        Curve2DKeySelcetBar(QWidget* parent = nullptr);

        void setData(const QString& keyName, const QList<double>& values);
        void setData(const QString& keyName, const QList<QString>& values);
        QList<int> getSelectedIndex();

    public slots:
        void slot_selectDataButtonClicked();
        void slot_sentChosenDataIds(const QModelIndexList& chosenID);

    private:
        ElaText* m_text;
        ElaLineEdit* m_lineEdit;
        ElaPushButton* m_button;
        DataChosenListDialog* m_dataChosenListDialog;
        QList<QString> m_values;
        QList<int> m_selectedIndexs;
    };
}
#endif
